
#ifndef STRIPESLIDERHANDLER_H
#define STRIPESLIDERHANDLER_H

#include <BTextual>
#include <BHandler>
#include <BFixedRestraint>
#include <BSliderRestraint>
#include <BHBoxLayout>
#include <BRealSlider>
#include <BRealSpinBox>
#include <BLineStripe>

using namespace BWE;

class StripeSliderHandler : public BHandler
{
public:
	StripeSliderHandler();
	~StripeSliderHandler();

protected:
	void slotValueSliderSliding(BObject* object, const BValue& value);
	void slotLineStripeFlushed(BObject* object, const BValue& value);

protected:
	virtual void attached(BViewer* viewer);
	virtual void detached(BViewer* viewer);

	virtual void paint(BPainter& painter);
	virtual void render(BRender& render);

	virtual void styleEvent(const BEvent& event);

protected:
	BHolder<BHBoxLayout>	_layout;
	BRealSpinBox*			_valueSpinBox;
	BRealSlider*			_valueSlider;

	BHolder<BGroup>			_group;
	BHolder<BBody>			_nodeA;
	BHolder<BBody>			_nodeB;
	BHolder<BBody>			_nodeC;
	BFixedRestraint*		_fixedRestraint;
	BHolder<BLineStripe>	_lineStripe;
	BSliderRestraint*		_stripeRestraint;
	BVector					_debugPoint;
	BVector					_debugDirect;
};

#endif

